﻿namespace Example.Creational
{
    using Example.Creational.Singleton;

    using Xunit;

    /// <summary>
    /// Ensure a class has only one instance, and provide a global point of access to it.
    /// </summary>
    public sealed class SingletonFacts
    {
        [Fact]
        public void singleton()
        {
            var first = Thing.Singleton;
            var second = Thing.Singleton;

            Assert.Same(first, second);
        }
    }
}